package picture

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type PictureRouter struct {
}

// InitPictureRouter 初始化 Picture 路由信息
func (s *PictureRouter) InitPictureRouter(Router *gin.RouterGroup) {
	pictureRouter := Router.Group("picture").Use(middleware.OperationRecord())
	pictureRouterWithoutRecord := Router.Group("picture")
	var pictureApi = v1.ApiGroupApp.PictureApiGroup.PictureApi
	{
		pictureRouter.POST("createPicture", pictureApi.CreatePicture)             // 新建Picture
		pictureRouter.DELETE("deletePicture", pictureApi.DeletePicture)           // 删除Picture
		pictureRouter.DELETE("deletePictureByIds", pictureApi.DeletePictureByIds) // 批量删除Picture
		pictureRouter.PUT("updatePicture", pictureApi.UpdatePicture)              // 更新Picture

		pictureRouter.POST("create", pictureApi.PictureCreate)
		pictureRouter.DELETE("delete", pictureApi.PictureDelete)
	}
	{
		pictureRouterWithoutRecord.GET("findPicture", pictureApi.FindPicture)       // 根据ID获取Picture
		pictureRouterWithoutRecord.GET("getPictureList", pictureApi.GetPictureList) // 获取Picture列表
	}
}
